﻿<?xml version="1.0" encoding="utf-8" ?>
<hibernate-mapping xmlns="urn:nhibernate-mapping-2.2"
									namespace="VictorBlaga.DocumentManagement.Core.Models"
									assembly="VictorBlaga.DocumentManagement.Core">
  <class name="Team" table="Teams" dynamic-update="true">
    <cache usage="read-write"/>
    <id name="ID" column="TeamID" type="Int32" unsaved-value="0">
      <generator class="native"/>
    </id>
    <property name="Name" length="50" not-null="true"/>
    <bag name="Workshops" inverse="true">
      <key column="TeamID"  />
      <one-to-many class="Workshop" />
    </bag>
    <many-to-one name="Manager" class="User" unique="true" column="ManagerID"/>
  </class>
</hibernate-mapping>